﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="Pacientes.aspx.cs" Inherits=" RzCorportativo.Views.Consulta.Pacientes" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h1>
        Pacientes</h1>
    <hr />
    <div style="min-width: 800px; margin-top: 30px" class="grid">
        <div class="controls controls-row">
            <asp:TextBox runat="server" ID="Nome" placeholder="Nome" />
            <asp:TextBox runat="server" ID="CPF" mask="cpf" placeholder="CPF" />
        </div>
        <%--<table border="0" cellpadding="0" cellspacing="" style="width: 100%">
            <tr>
                <td class="field">
                    Nome:
                </td>
                <td class="field2">
                </td>
                <td class="field">
                    CPF:
                </td>
                <td class="field2">
                </td>
            </tr>
        </table>--%>
        <input type="button" name="novo" value="novo" class="btn btn-inverse" onclick="window.location='<%= EFramework.Web.UrlBase.UrlPadrao%>Views/Cadastros/Pacientes.aspx'" />
        <asp:Button Text="buscar" ID="buscar" runat="server" OnClick="buscar_Click" CssClass="btn" />
        <br />
        <br />
        <asp:GridView runat="server" ID="ListaPacientes" AutoGenerateColumns="false" AlternatingRowStyle-CssClass="gridrow_alternate"
            RowStyle-CssClass="gridrow" CssClass="table-hover" OnSelectedIndexChanging="ListaPacientes_SelectedIndexChanging"
            PageSize="5" AllowPaging="true" OnPageIndexChanging="ListaPacientes_PageIndexChanging">
            <EmptyDataTemplate>
                <strong>Não foram encontrados pacientes para os filtros selecionados</strong>
            </EmptyDataTemplate>
            <Columns>
                <asp:TemplateField Visible="false">
                    <ItemTemplate>
                        <asp:TextBox runat="server" ID="PacienteId" Text='<%# ((RzCorportativo.Lib.Paciente)Container.DataItem).PacienteId%>' />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="PacienteId" HeaderText="Código" />
                <asp:BoundField DataField="Nome" HeaderText="Nome" />
                <asp:BoundField DataField="Cpf" HeaderText="Cpf" />
                <asp:BoundField DataField="Email" HeaderText="E-mail" />
                <%--<asp:CommandField ShowDeleteButton="true" DeleteText="Excluir" />--%>
                <asp:CommandField ShowSelectButton="true" SelectText="Selecionar" />
            </Columns>
        </asp:GridView>
    </div>
</asp:Content>
